package com.seeTools.next.api.entity.member;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.seeTools.next.api.entity.TenantBaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author seeTools
 * @since 2025-08-27
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("member_info")
public class MemberInfo extends TenantBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 会员昵称
     */
    @TableField(value = "nick_name")
    @ExcelProperty(value = "会员昵称")
    private String nickName;

    /**
     * 手机号码
     */
    @TableField(value = "phone")
    @ExcelProperty(value = "手机号码")
    private String phone;

    /**
     * 累积积分
     */
    @TableField(value = "total_points")
    @ExcelProperty(value = "累积积分")
    private Integer totalPoints;

    /**
     * 成长值
     */
    @TableField(value = "total_develop")
    @ExcelProperty(value = "成长值")
    private Integer totalDevelop;

    /**
     * 微信
     */
    @TableField(value = "wechat")
    @ExcelProperty(value = "微信")
    private String wechat;

    /**
     * openid
     */
    @TableField(value = "openid")
    @ExcelProperty(value = "openid")
    private String openid;

    /**
     * 性别
     */
    @TableField(value = "sex")
    @ExcelProperty(value = "性别")
    private String sex;

    /**
     * 会员等级
     */
    @TableField(value = "member_grade")
    @ExcelProperty(value = "会员等级")
    private Long memberGrade;

    /**
     * 阳历生日
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "solar_birthday")
    @ExcelProperty(value = "阳历生日")
    private Date solarBirthday;

    /**
     * 阴历生日
     */
    @TableField(value = "lunar_birthday")
    @ExcelProperty(value = "阴历生日")
    private String lunarBirthday;

    /**
     * 员工ID
     */
    @TableField(value = "user_id")
    @ExcelProperty(value = "员工ID")
    private Long userId;

    /**
     * 账户余额
     */
    @TableField(value = "account_balance")
    @ExcelProperty(value = "账户余额")
    private BigDecimal accountBalance;

    /**
     * 消费次数
     */
    @TableField(value = "total_consumption")
    @ExcelProperty(value = "消费次数")
    private Integer totalConsumption;

    /**
     * 累积充值金额
     */
    @TableField(value = "recharge_amount")
    @ExcelProperty(value = "累积充值金额")
    private BigDecimal rechargeAmount;

    /**
     * 客单价
     */
    @TableField(value = "customer_price")
    @ExcelProperty(value = "客单价")
    private BigDecimal customerPrice;

    /**
     * 上次消费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "last_consumption_time")
    @ExcelProperty(value = "上次消费时间")
    private Date lastConsumptionTime;

    /**
     * 首次消费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "first_consumption_time")
    @ExcelProperty(value = "首次消费时间")
    private Date firstConsumptionTime;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "registration_time")
    @ExcelProperty(value = "注册时间")
    private Date registrationTime;

    /**
     * 注册来源
     */
    @TableField(value = "registration_source")
    @ExcelProperty(value = "注册来源")
    private String registrationSource;

    /**
     * 推荐人
     */
    @TableField(value = "referrer_id")
    @ExcelProperty(value = "推荐人")
    private Long referrerId;

    /**
     * 转介绍
     */
    @TableField(value = "introduction")
    @ExcelProperty(value = "转介绍")
    private Integer introduction;

    /**
     * 标签IDS
     */
    @TableField(value = "label_ids")
    @ExcelProperty(value = "标签IDS")
    private String labelIds;


    /**
     * 备注
     */
    @TableField(value = "remark")
    @ExcelProperty(value = "备注")
    private String remark;


    /**
     * 总学习时长
     */
    @TableField(value = "study_time")
    private BigDecimal studyTime;

    /**
     * 连续学习天数
     */
    @TableField(value = "study_day")
    private Integer studyDay;
}
